Class sjl.RandomGenerator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sjl.RandomGenerator

java.lang.Object
   |
   +----sjl.RandomGenerator

public class RandomGenerator
extends Object
RandomGenerator is a random number generator. It implements the same algorithm as the random number generator in STL.

Variable Index

 o seed
The default seed.

Constructor Index

 o RandomGenerator()
Contruct a RandomGenerator using the default seed.
 o RandomGenerator(long)
Contruct a RandomGenerator using the specified seed.

Method Index

 o nextLong(long)
Return the next pseudo random number.

Variables

 o seed
  public static long seed
The default seed.

Constructors

 o RandomGenerator
  public RandomGenerator()
Contruct a RandomGenerator using the default seed.
 o RandomGenerator
  public RandomGenerator(long seed)
Contruct a RandomGenerator using the specified seed.

Methods

 o nextLong
  public long nextLong(long limit)
Return the next pseudo random number. The returned number will be in the range [0,limit).

All Packages  Class Hierarchy  This Package  Previous  Next  Index